<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8"/>
<title>主页</title>
<script type="text/javascript" th:src = "@{/webjars/jquery/3.3.1-1/jquery.js}"></script>
<script type="text/javascript" th:src = "@{../js/index.js}"></script>
</head>
<body>
	<h1 id="aa">SpringBoot!!!</h1>
	<div>
		<fieldset>
			<legend id="cz">添加</legend>
			<p>姓名:&nbsp;<input type="text" id="name" placeholder="请输入你的姓名..."/></p>
			<p>年龄:&nbsp;<input type="number" id="age" placeholder="请输入你的年龄..." max="200"/></p>
			<p>性别:
				<input type="radio" name="sex" value="男" checked="checked"/>男
				<input type="radio" name="sex" value="女"/>女
			</p>
			<p>薪资:&nbsp;<input type="number" id="salary" placeholder="请输入你的薪资..."/></p>
			<p>家庭住址:&nbsp;<input type="text" id="address" placeholder="请输入你的家庭住址..."/></p>
			<p><input type="hidden" id="createtime"/></p>
			<P>
				<input type="button" id="add" value="提交"/>
				<input type="button" id="m" value="提交修改"/>
			</P>
		</fieldset>
	</div>
	<div align="center">
		<fieldset>
			<legend id="cz2">操作栏</legend>
			<input type="button" id="export" value="导出"/>
			<input type="button" id="import" value="导入"/>
			<div id="im">
				<p><input type="file" name="file" id="file"/></p>
				<p>
					<input type="button" value="提交" id="tjdr"/>
					<input type="button" value="取消" id="cancel"/>
				</p>
			</div>
		</fieldset>
	</div>
	<div align="center">
		<table>
			<thead>
				<tr align="center">
					<td>ID</td>
					<td>姓名</td>
					<td>年龄</td>
					<td>性别</td>
					<td>薪资</td>
					<td>家庭住址</td>
					<td>创建时间</td>
					<td>操作</td>
				</tr>
			</thead>
			<tbody>
				<tr th:each = "p:${persons}" align="center">
					<td th:text = "${p.id}"></td>
					<td th:text = "${p.name}"></td>
					<td th:text = "${p.age}"></td>
					<td th:text = "${p.gender}"></td>
					<td th:text = "${p.salary}"></td>
					<td th:text = "${p.address}"></td>
					<td th:text = "${p.createtime}"></td>
					<td>
						<input type="button" value="查看" th:onclick = "'javascript:f(\''+${p}+'\')'"/>
						<input type="button" value="修改" th:onclick = "'javascript:modi(\''+${p}+'\')'"/>
						<input type="button" value="删除" th:onclick = "'javascript:del(\''+${p.id}+'\')'" />
					</td>
				</tr>
			</tbody>
		</table>
		<p>
			<input type="button" value="上一页" id="previous"/>
			<input type="text" id="page" value="1"/>
			<input type="button" value="下一页" id="next"/>
		</p>
	</div>
	<div>
		<fieldset>
			<legend>Redis</legend>
			key:&nbsp;<input type="text" id="ke"/>
			value:&nbsp;<input type="text" id="valu"/>
			<input type="button" onclick="redisss()" value="提交"/>
		</fieldset>
	</div>
	<div>
		<fieldset>
			<legend>发送邮件</legend>
			key:&nbsp;<input type="text" id="ke"/>
			value:&nbsp;<input type="text" id="valu"/>
			<input type="button" onclick="mail()" value="发送"/>
		</fieldset>
	</div>
</body>
</html>